Skip to content

fix(cua-driver): report inaccessible Windows daemon pipes - #3318

Open
injaneity wants to merge 2 commits into
mainfrom
fix/windows-ssh-pipe-diagnostics
Open

fix(cua-driver): report inaccessible Windows daemon pipes#3318
injaneity wants to merge 2 commits into
mainfrom
fix/windows-ssh-pipe-diagnostics

Conversation

@injaneity

@injaneity injaneity commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

summary

  • require a successful daemon protocol request before cua-driver status reports that the daemon is running
  • distinguish an existing but unreachable endpoint and explain the Windows same-account named-pipe boundary
  • document that OpenSSH and the interactive daemon must use the same Windows SID
  • remove the unsupported session field from the documented status output

closes #2771

root cause

The Windows daemon pipe is intentionally private to the SID that owns the interactive daemon. WaitNamedPipeW, which backed the first status check, proves that the pipe name exists without proving that the caller may open it. A different SSH account therefore saw “daemon is running” from status, then received Windows error 5 when MCP attempted the real connection.

Session 0 is not the blocker. A same-SID Session 0 client can connect to the interactive Session 1 daemon.

validation

Exact head: 57bd56f9e9b7 (current main integrated; contributor commit bbebabcd5 preserved)

Live Windows OpenSSH replay against an elevated interactive Cua daemon:

  • interactive daemon: Session 1, SID suffix -1000
  • different-user SSH client: Session 0, SID suffix -1001
    • status detected the pipe
    • mcp --socket \.\pipe\cua-driver failed with Access is denied. (os error 5)
  • same-user SSH client: Session 0, SID suffix -1000
    • the same MCP command accepted initialize and returned the Cua server response

The temporary SSH key, test binary, account allowance, and ACL changes were removed after the replay; the original OpenSSH configuration was restored.

Also checked:

  • git diff --check
  • source assertion that status performs send_request before printing “daemon is running”

Current-main integration validation: cargo fmt --check --all, cargo check -p cua-driver --bin cua-driver, and git diff --check origin/main...HEAD pass locally. Fresh exact-head pull request CI, including the hosted Windows compile lane, is running. The earlier live two-SID OpenSSH replay remains behavior evidence because the integration merge did not change this two-file patch.

@injaneity injaneity changed the title fix(cua-driver): diagnose Windows SSH pipe access fix(cua-driver): report inaccessible Windows daemon pipes Aug 21, 2026
@injaneity
injaneity marked this pull request as ready for review August 21, 2026 16:59
@injaneity
injaneity requested a review from f-trycua as a code owner August 21, 2026 16:59

@f-trycua f-trycua left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified at 57bd56f9e9b7215537800e47d61eb043d2810ace after integrating current main without rewriting the contributor commit. Formatting and the focused driver binary check pass, the prior two-SID Windows OpenSSH replay covers the intended inaccessible-pipe diagnostic, and all current checks are green: 38 successful with one intentional release-metadata skip.

This does not provide the unavailable private Fleet Server 2025 replay, but the final two-file diff is unchanged in behavior from the previously replayed Windows candidate and the exact-head Windows compile/unit lane passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows OpenSSH MCP proxy: Access is denied opening interactive Cua daemon pipe

2 participants